unit Unit2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, ExtCtrls, StdCtrls, jpeg, XPMan;

type
  TForm2 = class(TForm)
    Timer1: TTimer;
    ProgressBar1: TProgressBar;
    Button1: TButton;
    Image1: TImage;
    Label1: TLabel;
    Label2: TLabel;
    procedure Timer1Timer(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

uses Unit1;

{$R *.dfm}

procedure TForm2.Button1Click(Sender: TObject);
begin
    Form1 := TForm1.Create(Self);
    Form1.ShowModal;
    Form1.Free;
end;



procedure TForm2.Timer1Timer(Sender: TObject);
begin
    ProgressBar1.Position := ProgressBar1.Position + 1;
    if ProgressBar1.Position = 100 then
    begin
      ProgressBar1.Visible := false;
      Label1.Visible:= False;
      Button1.Visible:= true;
    end;
end;

end.
